/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.diplomka.webapp.messages;

import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.panel.Panel;

/**
 *
 * @author Jakub Kutil
 */
public class MessagePanel extends Panel {

    public MessagePanel(String id, PageParameters parameters) {
        super(id);

        if (parameters.containsKey("id")) {
            PageParameters p = new PageParameters();
            p.add("id", parameters.getString("id"));

            BookmarkablePageLink<Void> newMessage = new BookmarkablePageLink<>("newMessage", NewMessagePage.class, p);
            add(newMessage);

            BookmarkablePageLink<Void> recieved = new BookmarkablePageLink<>("recieved", MessageRecievedPage.class, p);
            add(recieved);

            BookmarkablePageLink<Void> sent = new BookmarkablePageLink<>("sent", MessageSentPage.class, p);
            add(sent);
        }
    }
}